/**
  ******************************************************************************
  * @file  
  * @author 
  * @version 
  * @date    
  * @brief   
  ******************************************************************************
	* @attention
  *
  * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  *
  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  * You may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
  *
  *        http://www.st.com/software_license_agreement_liberty_v2
  *
  * Unless required by applicable law or agreed to in writing, software 
  * distributed under the License is distributed on an "AS IS" BASIS, 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
  ******************************************************************************
  */
  
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __PWR_H
#define __PWR_H

/* Includes ------------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
#define PWR_OFFSET               (PWR_BASE - PERIPH_BASE)
#define PWR_CR_OFFSET            (PWR_OFFSET + 0x00)
#define PWR_CR_CWUF_BIT           2
#define PWR_CR_CWUF_BB           (PERIPH_BB_BASE + (PWR_CR_OFFSET * 32) + (PWR_CR_CWUF_BIT * 4))

#define PWR_CR_PDDS_BIT           1
#define PWR_CR_PDDS_BB           (PERIPH_BB_BASE + (PWR_CR_OFFSET * 32) + (PWR_CR_PDDS_BIT * 4))

#define PWR_CR_LPSDSR_BIT         0
#define PWR_CR_LPSDSR_BB         (PERIPH_BB_BASE + (PWR_CR_OFFSET * 32) + (PWR_CR_LPSDSR_BIT * 4))

#define PWR_CR_ULP_BIT            9
#define PWR_CR_ULP_BB            (PERIPH_BB_BASE + (PWR_CR_OFFSET * 32) + (PWR_CR_ULP_BIT * 4))

#define PWR_CR_FWU_BIT            10
#define PWR_CR_FWU_BB            (PERIPH_BB_BASE + (PWR_CR_OFFSET * 32) + (PWR_CR_FWU_BIT * 4))

#define PWR_CSR_OFFSET           (PWR_OFFSET + 0x04)
#define PWR_CSR_VOSF_BIT          4
#define PWR_CSR_VOSF_BB          (PERIPH_BB_BASE + (PWR_CSR_OFFSET * 32) + (PWR_CSR_VOSF_BIT * 4))


/* Exported functions ------------------------------------------------------- */
void PWR_Config(void);
void PWR_SetVoltageRange(FlagStatus lowPower);

#endif /* __PWR_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
